package com.sxhnpg.manager;

import java.io.Serializable;
import java.util.List;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.sxhnpg.dao.BaseDao;

public abstract class BaseManager {
	
	protected Log log = LogFactory.getLog(getClass());

	public abstract BaseDao getEntityDao();

	public Object getById(Serializable id) {
		return getEntityDao().getById(id);
	}
	
	public List findAll() {
		return getEntityDao().findAll();
	}
	
	public void saveOrUpdate(Object entity) {
		getEntityDao().saveOrUpdate(entity);
	}
	
	public void save(Object entity) {
		getEntityDao().save(entity);
	}
	
	public void remove(Object entity) {
		getEntityDao().delete(entity);
	}
	
	public void removeById(Serializable id) {
		getEntityDao().deleteById(id);
	}
	
	public void update(Object entity) {
		getEntityDao().update(entity);
	}
	
	
	
}
